<%@ page contentType = "text/html;charset=utf-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ page session="false" %>
<!DOCTYPE html>
<html lang="ko">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="/resources/knit/css/knit.css">
  <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
  <!--[if lt IE 9]>
    <script src="/resources/knit/js/html5shiv.js"></script>
    <script src="/resources/knit/js/respond.min.js"></script>
  <![endif]-->
  
  
</head>
<body style="padding-left:5px">
<h3>Table Desc.</h3>
<table class="table table-striped table-bordered table-ellipisis table-condensed" style="width:0px">
<thead>
		<tr>
			<c:forEach var="column" items="${desc.columns}">
				<th>${column}</th>
			</c:forEach>
		</tr>
</thead>
<tbody>
<c:forEach var="row" items="${desc.results}" varStatus="v">
<tr>
	<c:forEach var="col" items="${row}">
	<%-- <td style="max-width:200px;text-overflow:ellipsis;overflow:hidden">${col}</td> --%>
	<td>${col}</td>
	</c:forEach>
</tr>
</c:forEach>
</tbody>
</table>

<h3>Index</h3>
<table class="table table-striped table-bordered table-ellipisis table-condensed" style="width:0px">
<thead>
		<tr>
			<c:forEach var="column" items="${index.columns}">
				<th>${column}</th>
			</c:forEach>
		</tr>
</thead>
<tbody>
<c:forEach var="row" items="${index.results}" varStatus="v">
<tr>
	<c:forEach var="col" items="${row}">
	<%-- <td style="max-width:200px;text-overflow:ellipsis;overflow:hidden">${col}</td> --%>
	<td>${col}</td>
	</c:forEach>
</tr>
</c:forEach>
</tbody>
</table>

<h3>Snippet</h3>
<div class="alert alert-success" style="margin:10px;">
  <strong>SELECT ${desc.results[0][0]}<c:forEach begin="1" var="column" items="${desc.results}">, ${column[0]}</c:forEach> FROM ${table }</strong>
</div>
<div class="alert alert-success" style="margin:10px;">
  <strong>INSERT INTO ${table} (${desc.results[0][0]}<c:forEach begin="1" var="column" items="${desc.results}">, ${column[0]}</c:forEach>) VALUES</strong>
</div>
</body>
</html>
